﻿package mortal.game.view.copy.escort
{
    import Message.Public.*;
    import extend.language.*;
    import flash.events.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;

    public class EscortCopyHarryMiniView extends EscortCopyMiniViewBase
    {
        private static var _instance:EscortCopyHarryMiniView;

        public function EscortCopyHarryMiniView()
        {
            return;
        }// end function

        override protected function onClickSubmitTaskBtnHandler(event:MouseEvent) : void
        {
            return;
        }// end function

        override public function update(param1:Object, ... args) : void
        {
            args = param1 as SRobPlayer;
            var _loc_4:* = CopyUtil.getEscortCopyCarNum(args.robCountDict);
            _todayNum.text = Language.getString(70061);
            _taskContent.htmlText = Language.getStringByParam(70114, _loc_4.total);
            this.numTxt = _loc_4.arr;
            _tfLeftTime.setLeftTime(args.leftSeconds);
            return;
        }// end function

        override public function show(param1:int = 0, param2:int = 0) : void
        {
            super.show(param1, param2);
            var _loc_3:* = Cache.instance.task.getTaskByGroupInTaskDoing(ETaskGroup._ETaskGroupRobEscort, ETaskStatus._ETaskStatusHadComplete);
            if (_loc_3.length > 0)
            {
                _taskInfo = _loc_3[0];
                this.addChild(_submitTaskBtn);
            }
            return;
        }// end function

        override protected function configUI() : void
        {
            _bgName = ImagesConst.TaskTrack_Bg;
            _titleText = "";
            super.configUI();
            return;
        }// end function

        public static function get instance() : EscortCopyHarryMiniView
        {
            if (!_instance)
            {
                _instance = new EscortCopyHarryMiniView;
            }
            return _instance;
        }// end function

        public static function get hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
